package cn.sdormitory.service.impl;

import cn.sdormitory.knowledgebase.dao.RuleRegulationDao;
import cn.sdormitory.knowledgebase.pojo.RuleRegulation;
import cn.sdormitory.knowledgebase.vo.RuleRegulationVo;
import cn.sdormitory.service.AppRuleRegulationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AppRuleRegulationServiceImpl extends ServiceImpl<RuleRegulationDao, RuleRegulation> implements AppRuleRegulationService {

    @Autowired
    private RuleRegulationDao ruleRegulationDao;

    @Override
    public List<RuleRegulationVo> getRuleRegulationList() {
        return ruleRegulationDao.getList();
    }

    @Override
    public RuleRegulation getRuleRegulationById(Integer id) {
        return ruleRegulationDao.getRuleRegulationById(id);
    }

    @Override
    public Integer incrementViewCount(Integer id) {
        return ruleRegulationDao.incrementViewCount(id);
    }

    @Override
    public Integer getViewCount(Integer id) {
        return ruleRegulationDao.getViewCount(id);
    }

}
